﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="YongHuXXWH.aspx.cs" Inherits="Web.Pages.QuShui.DiXiaS.YongHuGL.YongHuXXWH" Theme="Default" %>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../../../../JS/jquery.js"></script>
    <script src="../../../../JS/AddEditCancel.js" type="text/javascript"></script>
    <style type="text/css">
        td {
         white-space:nowrap;
        }
    </style>
    <script type="text/javascript">

      
        function ShiFouTS(s) {
            if (s.GetChecked()) {
                txtKaiHuHM.SetEnabled(true);
                txtKaiHuZH.SetEnabled(true);
                txtKaiHuYH.SetEnabled(true);
                txtHeTongH.SetEnabled(true);
            }
            else {
                txtKaiHuHM.SetEnabled(false);
                txtKaiHuZH.SetEnabled(false);
                txtKaiHuYH.SetEnabled(false);
                txtHeTongH.SetEnabled(false);
            }
        }


        function ASPxCallback1Complete(rs) {
            var arr = rs.split('|');
            var type = arr[0];
            var state = arr[1];
            var specialIdentity = arr[2];
            var msg = arr[3].split('-');
            if (msg[0] == 'True') {
                alert(msg[1]);
            }
            hdCollection.Set("type", type);
            if (state == 'True') {
                if (type == "gethth") {
                    //成功获取合同号
                    txtHeTongH.SetValue(specialIdentity);
                }
            }
            else {

            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="tabletitle1" align="center">
            用户信息维护
        </div>
        <dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="hdCollection" runat="server"></dx:ASPxHiddenField>
        <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){ASPxCallback1Complete(e.result);}"></dx:ASPxCallback>
        <asp:UpdatePanel runat="server" ID="updatePanel1">
            <ContentTemplate>
                <div style="border: 0px solid #4486a9; width: 99%;">
                    <div style="width: 80%; margin: auto;">

                        <fieldset style="border: 1px solid  #d0e4fe;">
                            <asp:Panel ID="panEdit" runat="server">
                                <legend style="font-weight: bold"></legend>
                                <table border="0" style="margin: auto; width: 100%">
                                    <tr>
                                        <td style="text-align: right">用户号：
                                        </td>
                                        <td>
                                            <dx:ASPxTextBox ID="txtConYongHuH" ClientInstanceName="txtConYongHuH" runat="server" Width="60%" MaxLength="7">
                                                <ClientSideEvents KeyPress="function(s,e){var key = event.keyCode;if( key==13){btnSearch.onClick();}}" />
                                            </dx:ASPxTextBox>
                                        </td>
                                        <td>
                                            <dx:ASPxButton ID="btnSearch" ClientInstanceName="btnSearch" runat="server" Text="查找" OnClick="btnSearch_Click" UseSubmitBehavior="false">
                                            </dx:ASPxButton>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">用户名：
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxTextBox ID="txtYONGHUM" ClientInstanceName="txtYONGHUM" runat="server" Width="80%">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(cbmGuanLiBM);}" />
                                            </dx:ASPxTextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right;">管理部门：
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxComboBox ID="cbmGuanLiBM" ClientInstanceName="cbmGuanLiBM" runat="server" Width="80%">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtShuiJia);}" />
                                            </dx:ASPxComboBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">水价：
                                        </td>
                                        <td>
                                            <table>
                                                <tr>
                                                    <td>
                                                        <dx:ASPxTextBox ID="txtShuiJia" ClientInstanceName="txtShuiJia" runat="server" Width="40%" ClientEnabled="false">
                                                             <ClientSideEvents KeyPress="function(s,e){OnKeyNext(cmbYeWuY);}" />
                                                        </dx:ASPxTextBox>
                                                    </td>
                                                    <td>元</td>
                                                </tr>
                                            </table>

                                        </td>
                                        <td style="text-align: right">业务员：
                                        </td>
                                        <td>
                                            <dx:ASPxComboBox ID="cmbYeWuY" ClientInstanceName="cmbYeWuY" runat="server" ValueType="System.String" Width="60%">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(cmbXingZhengQ);}" />
                                            </dx:ASPxComboBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">行政区：
                                        </td>
                                        <td>
                                            <dx:ASPxComboBox ID="cmbXingZhengQ" ClientInstanceName="cmbXingZhengQ" runat="server" ValueType="System.String" Width="60%">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(cmbHuanXianBJ);}" />
                                            </dx:ASPxComboBox>
                                        </td>
                                        <td style="text-align: right">环线标记：
                                        </td>
                                        <td>
                                            <dx:ASPxComboBox ID="cmbHuanXianBJ" ClientInstanceName="cmbHuanXianBJ" runat="server" ValueType="System.String" Width="60%">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(cmbQuShuiYT);}" />
                                            </dx:ASPxComboBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">取水用途：
                                        </td>
                                        <td>
                                            <dx:ASPxComboBox ID="cmbQuShuiYT" ClientInstanceName="cmbQuShuiYT" runat="server" ValueType="System.String" Width="60%">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(cmbHangYeLX);}" />
                                            </dx:ASPxComboBox>
                                        </td>
                                        <td style="text-align: right">行业分类：
                                        </td>
                                        <td>
                                            <dx:ASPxComboBox ID="cmbHangYeLX" ClientInstanceName="cmbHangYeLX" runat="server" ValueType="System.String" Width="60%">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(cmbLiuYu);}"  />
                                            </dx:ASPxComboBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">流域：
                                        </td>
                                        <td>
                                            <dx:ASPxComboBox ID="cmbLiuYu" ClientInstanceName="cmbLiuYu" runat="server" ValueType="System.String" Width="60%">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(cmbShuiLiFP);}"  />
                                            </dx:ASPxComboBox>
                                        </td>
                                        <td style="text-align: right">水利分片：
                                        </td>
                                        <td>
                                            <dx:ASPxComboBox ID="cmbShuiLiFP" ClientInstanceName="cmbShuiLiFP" runat="server" ValueType="System.String" Width="60%">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(cmbShuiZiYFQ);}"  />
                                            </dx:ASPxComboBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">水资源分区：
                                        </td>
                                        <td>
                                            <dx:ASPxComboBox ID="cmbShuiZiYFQ" ClientInstanceName="cmbShuiZiYFQ" runat="server" ValueType="System.String" Width="60%">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(cmbZhuangBiaoJL);}" />
                                            </dx:ASPxComboBox>
                                        </td>
                                        <td style="text-align: right">装表计量：
                                        </td>
                                        <td>
                                            <dx:ASPxComboBox ID="cmbZhuangBiaoJL" ClientInstanceName="cmbZhuangBiaoJL" runat="server" ValueType="System.String" Width="60%">
                                                <Items>
                                                    <dx:ListEditItem Text="是" Value="1" />
                                                    <dx:ListEditItem Text="否" Value="2" />
                                                </Items>
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtLianXiR);}" />
                                            </dx:ASPxComboBox>
                                        </td>
                                    </tr>
                                    <tr>
                                         <td style="text-align: right"><span id="sfbz" runat="server" >收费标准：</span>
                                        </td>
                                        <td>
                                            <dx:ASPxComboBox ID="cmbSFBZ" ClientInstanceName="cmbSFBZ" runat="server" ValueType="System.String" Width="60%" >
                                                <Items>
                                                    <dx:ListEditItem Text="100%水量" Value="01" />
                                                    <dx:ListEditItem Text="1%水量" Value="02" />
                                                    <%--<dx:ListEditItem Text="从电量" Value="03" />--%>
                                                </Items>
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtLianXiR);}" />
                                            </dx:ASPxComboBox>
                                        </td> 
                                    </tr>
                                    <tr>
                                        <td colspan="4">
                                            <hr />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">联系人：
                                        </td>
                                        <td>
                                            <dx:ASPxTextBox ID="txtLianXiR" ClientInstanceName="txtLianXiR" runat="server" Width="80%" MaxLength="20">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtLianXiBM);}" />
                                            </dx:ASPxTextBox>
                                        </td>
                                        <td style="text-align: right">联系部门：
                                        </td>
                                        <td>
                                            <dx:ASPxTextBox ID="txtLianXiBM" ClientInstanceName="txtLianXiBM" runat="server" Width="100%" MaxLength="20">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtYouBian);}" />
                                            </dx:ASPxTextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">邮编：
                                        </td>
                                        <td>
                                            <dx:ASPxTextBox ID="txtYouBian" ClientInstanceName="txtYouBian" runat="server" Width="80%" MaxLength="10">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtLianXiDH);}" />
                                            </dx:ASPxTextBox>
                                        </td>
                                        <td style="text-align: right">联系电话：
                                        </td>
                                        <td>
                                            <dx:ASPxTextBox ID="txtLianXiDH" ClientInstanceName="txtLianXiDH" runat="server" Width="100%" MaxLength="50">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtDiZhi);}" />
                                            </dx:ASPxTextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">地址：
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxTextBox ID="txtDiZhi" ClientInstanceName="txtDiZhi" runat="server" Width="100%" MaxLength="50">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(cmbSFQY);}" />
                                            </dx:ASPxTextBox>
                                        </td>
                                    </tr>
                                     <tr>
                                        <td style="text-align: right">收费区域：
                                        </td>
                                        <td>
                                            <dx:ASPxComboBox ID="cmbSFQY" ClientInstanceName="cmbSFQY" runat="server" ValueType="System.String" Width="60%">
                                                <Items>
                                                    <%--<dx:ListEditItem Text="" Value="0" />--%>
                                                    <dx:ListEditItem Text="大陆" Value="0" />
                                                    <dx:ListEditItem Text="崇明" Value="1" />
                                                    <dx:ListEditItem Text="长兴" Value="2" />
                                                    <dx:ListEditItem Text="横沙" Value="3" />
                                                </Items>
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtCaiWuHM);}" />
                                            </dx:ASPxComboBox>
                                        </td>
                                    </tr> 
                                    <tr>
                                        <td style="text-align: right">财务户名：
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxTextBox ID="txtCaiWuHM" ClientInstanceName="txtCaiWuHM" runat="server" Width="100%" MaxLength="50">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtCaiWuDZ);}" />
                                            </dx:ASPxTextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">财务地址：
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxTextBox ID="txtCaiWuDZ" ClientInstanceName="txtCaiWuDZ" runat="server" Width="100%" MaxLength="50">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtCaiWuYB);}" />
                                            </dx:ASPxTextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">财务邮编：
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxTextBox ID="txtCaiWuYB" ClientInstanceName="txtCaiWuYB" runat="server" Width="100%" MaxLength="50">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtKaiHuHM);}" />
                                            </dx:ASPxTextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="4">
                                            <hr />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td>
                                            <dx:ASPxCheckBox ID="cbShiFouTS" ClientInstanceName="cbShiFouTS" runat="server" Text="是否托收" Checked="false">
                                                <ClientSideEvents  CheckedChanged="function(s,e){ShiFouTS(s);}"/>
                                            </dx:ASPxCheckBox>
                                        </td>
                                        <td></td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">开户户名：
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxTextBox ID="txtKaiHuHM" ClientInstanceName="txtKaiHuHM" runat="server" Width="80%" MaxLength="50">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtKaiHuZH);}" />
                                            </dx:ASPxTextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">开户账号：
                                        </td>
                                        <td colspan="3">
                                            <table style="width: 100%">
                                                <tr>
                                                    <td>
                                                        <dx:ASPxTextBox ID="txtKaiHuZH" ClientInstanceName="txtKaiHuZH" runat="server" Width="80%" MaxLength="50">
                                                            <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtKaiHuYH);}" KeyUp="function(s,e){
                                                        var strlen=document.getElementById('txtYHZH_I').value.length;
                                                        var strTip;
                                                        if(strlen==0)
                                                        {
                                                            strTip='';
                                                        }
                                                        else
                                                        {
                                                            strTip='长度:'+strlen;
                                                        }
                                                         document.getElementById('lblTipYHZH').innerText=strTip;
                                                         }" />
                                                        </dx:ASPxTextBox>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxLabel ID="lblTipYHZH" ClientInstanceName="lblTipYHZH" runat="server" ForeColor="Red" Text=""></dx:ASPxLabel>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">开户银行：
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxTextBox ID="txtKaiHuYH" ClientInstanceName="txtKaiHuYH" runat="server" Width="80%" MaxLength="50">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtHeTongH);}" />
                                            </dx:ASPxTextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">合同号：
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxTextBox ID="txtHeTongH" ClientInstanceName="txtHeTongH" runat="server" Width="100%" MaxLength="40">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtBeiZhu);}" />
                                            </dx:ASPxTextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">备注：
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxTextBox ID="txtBeiZhu" ClientInstanceName="txtBeiZhu" runat="server" Width="100%">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(btnSave);}" />
                                            </dx:ASPxTextBox>
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>
                        </fieldset>
                    </div>
                    <div style="text-align: right">
                        <hr />

                        <dx:ASPxButton ID="btnEdit" ClientInstanceName="btnEdit" runat="server" Text="修改" OnClick="btnEdit_Click" UseSubmitBehavior="false" Visible="false">
                        </dx:ASPxButton>
                        <dx:ASPxButton ID="btnSave" ClientInstanceName="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" UseSubmitBehavior="false" Visible="false">
                            <ClientSideEvents Click="function(s, e) {
	                                               if (ASPxClientEdit.ValidateGroup('group')) {                 
                                                                   e.processOnServer = true;             
                                                                } 
                                                                else 
                                                                { 
                                                                   e.processOnServer = false; 
                                                                }
                                                    }" />
                        </dx:ASPxButton>
                        <dx:ASPxButton ID="btnCancel" ClientInstanceName="btnCancel" runat="server" Text="放弃" OnClick="btnCancel_Click" UseSubmitBehavior="false" Visible="false">
                        </dx:ASPxButton>

                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>


    </form>
</body>
</html>

